<!-- 店铺首页 -->
<!DOCTYPE html>
<html class="no-js " lang="zh-CN">
<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<link rel="icon" href="file/img/favicon.ico">
	<title>{$title}</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<link href="{$Think.config.RESOURCEURL}wx_assets/css/common.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
	<link href="{$Think.config.RESOURCEURL}wx_assets/swiper/swiper.min.css{$Think.config.RESOURCE_VER}" rel="stylesheet" type="text/css">
	<link href="{$Think.config.RESOURCEURL}wx_assets/css/iconfont/font_tuan.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
	<link href="{$Think.config.RESOURCEURL}wx_assets/css/swiper.min.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
	<if condition="$mallHue.mallHue eq '1'">
		<link href="{$Think.config.RESOURCEURL}wx_assets/css/product/product_yxds_index_blue.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
		<else/>
		<link href="{$Think.config.RESOURCEURL}wx_assets/css/product/product_yxds_index.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
	</if>
	<!-- <script src="http://sdk.talkingdata.com/app/h5/v1?appid=DE13C350F41F5DE78FEC51DB5DE730D1&vn=v2&vc=v2"></script> -->
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/zepto.1.1.3.min.js{$Think.config.RESOURCE_VER}"></script>
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/zepto.alert.js{$Think.config.RESOURCE_VER}"></script>
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/dist/iscroll.js{$Think.config.RESOURCE_VER}"></script>
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/swiper/swiper.min.js{$Think.config.RESOURCE_VER}"></script>
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/dist/imglazyload.js{$Think.config.RESOURCE_VER}"></script>
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/swiper.min.js{$Think.config.RESOURCE_VER}"></script>
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/wx_share.js{$Think.config.RESOURCE_VER}"></script>
	<script src="{$Think.config.RESOURCEURL}wx_assets/js/util.js{$Think.config.RESOURCE_VER}"></script>
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/product/product.js{$Think.config.RESOURCE_VER}"></script>
	<script src="{$Think.config.RESOURCEURL}wx_assets/js/product/timer.js{$Think.config.RESOURCE_VER}" type="text/javascript"></script>
</head>
<body>
<!--关注浮层 begin-->
<!--0表示未关注，1表示已关注-->
<if condition="$selfInfo.subscribe eq '0'">

	<div class="careview">
		<img src="{$mallInfo.logo}" alt="" />
		<a href='{$mallInfo.wechaturl}'>立即关注</a>
		<empty name="mallInfo.recommend">
			<p>{$mallInfo.wechatname}</p>
			<else />
			<p>{$mallInfo.recommend}</p>
		</empty>
		<span></span>
	</div>
	<script>
		$('.careview > span').on('click',function(){
			$('.careview').hide();
		});
	</script>
</if>
<a id="car" class="car" onclick="shopIndex.goCart()">
	<i class="iconfont">&#xe608;</i>
		<span>
			<p id="carNum"></p>
		</span>
</a>
<!--关注浮层 end-->
<php>$proIndex=0;</php>
<div class="container ">
	<volist name="item" id="pitem" key="i">
		<if condition="$pitem.moduleType eq 'topmallinfo'">
			<div class="topmallinfo">
				<i class="per">&#xe664;</i>
				<div class="shop" onclick="shopIndex.goCart()">
					<i class="car_num">&#xe608;</i>
				</div>
				<span>{$pitem['aboutitem'][0]['title']}</span>
			</div>
		</if>
		<if condition="$pitem.moduleType eq 'searchBar'">
			<div class="searchDiv">
				<div class="search">
					<span class="iconfont">&#xe612;</span>
					<input type="text" placeholder="请输入商品名称" onclick="shopIndex.toSearch()">
				</div>
			</div>
		</if>
		<if condition="$pitem.moduleType eq 'play'">
			<div class="swiper-container" style="font-size:0">
				<ul class="play swiper-wrapper">
					<volist name="pitem.aboutitem" id="play">
						<li class="swiper-slide" style="height:auto">
							<a href="{$play.piclink}">
								<img src="{$play.picurl}" />
							</a>
						</li>
					</volist>
				</ul>
				<p class="swiper-pagination"></p>
			</div>
			<script>
				new Swiper('.swiper-container',{
					pagination: '.swiper-pagination',
					autoplay:3000
				});
				if($(".play li").size()<=1){
					$(".swiper-pagination").hide();
				}
			</script>
		</if>
		<if condition="$pitem.moduleType eq 'category'">
			<div class="category">
				<ul style="font-size: 0;">
					<volist name="pitem.aboutitem" id="category">
						<li>
							<a href="{$category.cateurl}">
								<img src="{$category.catepic}">
								<span>{$category.catetitle}</span>
							</a>
						</li>
					</volist>
				</ul>
			</div>
		</if>
		<if condition="$pitem.moduleType eq 'pershow'">
			<div class="pershow pershow<php>echo count($pitem['aboutitem'])</php>">
				<if condition="$pitem.title neq ''">
					<div class="title">{$pitem.title}</div>
				</if>
				<div class="pershowImg">
					<volist name="pitem.aboutitem" id="pershow">
						<a href="{$pershow.piclink}" style="font-size:0">
							<img src="{$pershow.picurl}">
						</a>
					</volist>
				</div>
			</div>
		</if>
		<if condition="$pitem.moduleType eq 'permenu'">
			<div class="permenu">
				<img class="permenubg" src="{$pitem.permenubg}">
				<div class="menu">
					<volist name="pitem.aboutitem" id="permenu">
						<a href="{$permenu.link}">{$permenu.name}</a>
					</volist>
				</div>
				<img src="{$Think.config.RESOURCEURL}wx_assets/indiana/images/iconfont-shouqijiantou.png" class="b_sw"/>
			</div>
		</if>
		<if condition="$pitem.moduleType eq 'proPlay'">
			<php>$proPlayIndex++;</php>
			<div class="proPlay swiper-container{$proPlayIndex}">
				<div class="tagImg" onclick="shopIndex.toTagProducts({$pitem.tagId})">
					<img src="{$pitem.tagInfo.picUrl}"/>
				</div>
				<ul class="swiper-wrapper">
					<volist name="pitem['productList']" id="list">
						<li class="swiper-slide" onclick="shopIndex.toProductDetail({$list.id})">
							<div class="imgDiv"><img src="{$list['picUrl1'][1]['picUrl']}?x-oss-process=image/resize,w_200,h_200,m_mfit,x-oss-process=image/crop,w_200,h_200,g_nw">
								<if condition="$list['inventory'] eq '1' and $list['inventoryCount'] elt 0"><div class="soldOut">已抢完</div></if>
								<if condition="$list['playType'] eq 4 and $list['seckillIsStart'] eq '1' and $list['seckillIsEnd'] neq '1'">
									<div class="seckillTime">
										<p style="text-align: center;"><!--<i class="timeicon"></i>-->
											<if condition="$list['seckillIsEnd'] neq '1'">
												<if condition="$list['seckillIsStart'] eq '1'">
													<i class="lxftime" nowtime="{$list.nowTime}" endtime="{$list.seckillEndTime}" col="0" lxfday="no" lxftext="距结束"></i>
													<else />
													<!-- {$list.seckillStartTime}-->
													<!--<php>echo date("H:i:s",strtotime($list["seckillStartTime"]));</php>-->
													<i class="lxftime" nowtime="{$list.nowTime}" endtime="{$list.seckillStartTime}" col="0" lxfday="no" lxftext="距开始"></i>
												</if>
												<else />
												已抢完
											</if>
										</p>
									</div>
									<else/>
									<!--<div class="taggroup">-->
										<!--<php>foreach($list["picTag"] as $key=>$value){</php>-->
																<!--<span>-->
																	<!--<p>{$value}</p>-->
																	<!--<if condition="$mallHue.mallHue eq '1'">-->
																		<!--<i><img src="{$Think.config.RESOURCEURL}wx_assets/images/product/tag_blue.png{$Think.config.RESOURCE_VER}" alt="" /></i>-->
																		<!--<else/>-->
																		<!--<i><img src="{$Think.config.RESOURCEURL}wx_assets/indiana/images/tag.png{$Think.config.RESOURCE_VER}" alt="" /></i>-->
																	<!--</if>-->

																<!--</span>-->
										<!--<php>}</php>-->
									<!--</div>-->
								</if>
							</div>
							<div class="proInfo">
								<div class="pname">
									<if condition="$list.freeBuy eq '1'">
										<span>我要代言</span>
									</if>
									<if condition="$list.playType eq '3'">
										<span class="indianaState">夺宝</span>&nbsp;
									</if>
									<if condition="$list.playType eq '6'">
										<span>众筹</span>
									</if>
									{$list.name}</div>
								<div class="price" style="<php>if($list['playType']==3){echo 'float:none';}</php>">
									<if condition="$list.playType eq '3'">
										<div class="indianaInfo">
											<div class="bar">
												<span style="width:{$list.barProgress}"></span>
											</div>
											<span style="font-size:12px;display:block;">开奖进度<span style="color:#009ddf">{$list.barProgress}</span></span>
										</div>
										<elseif condition="$list.freeBuy eq '1'"/>
										<i>&yen;</i>
										<php>
											$freeBuyMoney = explode(",",$list['freeBuyMoney']);
											if(count($freeBuyMoney) > 1) {
											echo $freeBuyMoney[0].'~<i>&yen;</i>'.end($freeBuyMoney);
											} else {
											echo $freeBuyMoney[0];
											}
										</php>
										<elseif condition="$list.playType eq '6'"/>
										<div class="indianaInfo" style="width:100%">
											<div class="bar">
												<span style="width:{$list.barProgress}"></span>
											</div>
											<div class="crowdInfo">
												<span>{$list.barProgress}</span>
												<span>剩余<span>{$list.day}</span>天</span>
											</div>
										</div>
										<elseif condition="$list.teambuy eq '1'"/>
										<i>&yen;</i>{$list.teamPrice|floatval}
										<elseif condition="$list.playType eq '5' AND $isEnjoyMiPrice eq '1'"/>
										<if condition="$list.supportSpecification eq '1'">
											<label class="price" style="margin-top:10px">
												￥{$list.minMiPrice|floatval}
											</label>
											<else/>
											<label class="price" style="margin-top:10px">
												￥{$list.miPrice|floatval}
											</label>
										</if>
										<elseif condition="$list.supportSpecification eq '1'"/>
										<if condition="$list.minDisPrice gt 0">
											<div class="price"><i>&yen;</i>{$list.minDisPrice|floatval}</div>
											<else/>
											<div class="price"><i>&yen;</i>{$list.minFixedPrice|floatval}</div>
										</if>
										<else/>
										<if condition="$list.discountedPrice neq ''">
											<div class="price"><i>&yen;</i>{$list.discountedPrice|floatval}</div>
											<else/>
											<div class="price"><i>&yen;</i>{$list.fixedPrice|floatval}</div>
										</if>
									</if>
								</div>
								<!--<if condition="$list.discountedPrice neq '' AND $list.teambuy neq '1'">
                                    <if condition=" $list.playType eq '5' AND $isEnjoyMiPrice eq '1' AND $pitem.moduleType neq 'two'">
                                        <else/>
                                        <div class="pfoot">
                                            <span class="market">市场价：<del><i>&yen;</i>{$list.fixedPrice}</del></span>
                                        </div>
                                    </if>
                                </if>-->
							</div>
						</li>
					</volist>
					<php>if($pitem['total']>count($pitem['productList'])){</php>
					<li class="proloadmore swiper-slide" data-tagid="{$pitem.tagId}" data-start="<php>echo count($pitem['productList']);</php>">
						<div>
							<a>查看更多</a>
							<span>View More</span>
						</div>
					</li>
					<php>}</php>
				</ul>
				<div style="display:none" class="swiper-pagination"></div>
			</div>
		</if>
		<if condition="$pitem.moduleType eq 'center'">
			<div class="center">
				<a href="{$pitem.aboutitem.centerlink}" style="font-size:0">
					<img src="{$pitem.aboutitem.centerpic}">
				</a>
			</div>
		</if>
		<if condition="$pitem.moduleType eq 'one' OR $pitem.moduleType eq 'two' OR $pitem.moduleType eq 'tbone'">
			<div class="list {$pitem.moduleType}_list">
				<ul>
					<volist name="pitem['productList']" id="list">
						<li onclick="shopIndex.toProductDetail({$list.id})" style="position:relative">
							<div class="proImg" style="position: relative;">
								<if condition="$pitem.moduleType eq 'two' or $pitem.moduleType eq 'one'">
									<img src="{$list['picUrl1'][1]['picUrl']}?x-oss-process=image/resize,w_200,h_200,m_mfit,x-oss-process=image/crop,w_200,h_200,g_nw">
									<else/>
									<img src="{$list.picUrl}?x-oss-process=image/resize,m_fill,h_288,w_640">
								</if>
								<if condition="$list['inventory'] eq '1' and $list['inventoryCount'] elt 0"><div class="soldOut">已抢完</div></if>
								<if condition="$list['playType'] eq 4 and $list['seckillIsStart'] eq '1' and $list['seckillIsEnd'] neq '1'">
									<div class="seckillTime">
										<p style="text-align: center;"><!--<i class="timeicon"></i>-->
											<if condition="$list['seckillIsEnd'] neq '1'">
												<if condition="$list['seckillIsStart'] eq '1'">
													<i class="lxftime" nowtime="{$list.nowTime}" endtime="{$list.seckillEndTime}" col="0" lxfday="no" lxftext="距结束"></i>
													<else />
													<!-- {$list.seckillStartTime}-->
													<!--<php>echo date("H:i:s",strtotime($list["seckillStartTime"]));</php>-->
													<i class="lxftime" nowtime="{$list.nowTime}" endtime="{$list.seckillStartTime}" col="0" lxfday="no" lxftext="距开始"></i>
												</if>
												<else />
												已抢完
											</if>
										</p>
									</div>
									<if condition="$pitem.moduleType neq 'one'">
										<div class="seckill_right_top"></div>
									</if>
									<else/>
									<div class="taggroup">
										<php>foreach($list["picTag"] as $key=>$value){</php>
																<span>
																	<p>{$value}</p>
																	<if condition="$mallHue.mallHue eq '1'">
																		<i><img src="{$Think.config.RESOURCEURL}wx_assets/images/product/tag_blue.png{$Think.config.RESOURCE_VER}" alt="" /></i>
																		<else/>
																		<i><img src="{$Think.config.RESOURCEURL}wx_assets/indiana/images/tag.png{$Think.config.RESOURCE_VER}" alt="" /></i>
																	</if>

																</span>
										<php>}</php>
									</div>
									<if condition="$pitem.moduleType neq 'one' and $list.teambuy eq 1">
										<div class="team_right_top"></div>
									</if>
								</if>
							</div>
							<div class="proInfo">
								<div class="pname">
									<if condition="$list.freeBuy eq '1'">
										<span>我要代言</span>
									</if>
									<if condition="$list.playType eq '3'">
										<span class="indianaState">夺宝</span>&nbsp;
									</if>
									<if condition="$list.playType eq '6'">
										<span>众筹</span>&nbsp;
									</if>
									{$list.name}</div>
								<div class="price" style="<php>if($list['playType']==3){echo 'float:none';}</php>">
									<if condition="$list.playType eq '3'">
										<div class="indianaInfo">
											<div class="bar">
												<span style="width:{$list.barProgress}"></span>
											</div>
											<if condition="$pitem.moduleType eq 'two'">
												<span style="font-size:12px;display:block;">开奖进度<span style="color:#009ddf">{$list.barProgress}</span></span>
												<else/>
												<div class="partakeCount">
													<span>总需{$list.totalCopies}人次</span>
													<span>剩余{$list.beenSold}</span>
												</div>
											</if>
										</div>
										<div class="btn_panic_div">
											<span class="btn_panic">立即抢购</span>
										</div>
										<elseif condition="$list.playType eq '6'"/>
											<div class="indianaInfo" style="width:100%">
												<div class="bar">
													<span style="width:{$list.barProgress}"></span>
												</div>
												<div class="crowdInfo">
													<span>{$list.barProgress}</span>
													<span>{$list.supportPerson||default=0}人支持</span>
													<span>剩余<span>{$list.day}</span>天</span>
												</div>
											</div>
										<elseif condition="$list.freeBuy eq '1'"/>
										<i>&yen;</i>
										<php>
											$freeBuyMoney = explode(",",$list['freeBuyMoney']);
											if(count($freeBuyMoney) > 1) {
											echo $freeBuyMoney[0].'~<i>&yen;</i>'.end($freeBuyMoney);
											} else {
											echo $freeBuyMoney[0];
											}
										</php>
										<elseif condition="$list.teambuy eq '1' AND $pitem.moduleType eq 'tbone'"/>
										<div class="teamInfo">
											<a>
												<i class="ico_team">
													<p>{$list.teamCount}<br />人团</p>
												</i>
												<div class="iteamNum"><i>&yen;</i>{$list.teamPrice|floatval}</div>
												<div class="iteamPrice"><i>&yen;</i><span>{$list.fixedPrice|floatval}</span></div>
												<div class="toDetail">去组团</div>
											</a>
										</div>
										<elseif condition="$list.teambuy eq '1'"/>
										<i>&yen;</i>{$list.teamPrice|floatval}
										<elseif condition="$list.playType eq '5' AND $isEnjoyMiPrice eq '1'"/>
										<if condition="$list.supportSpecification eq '1'">
											<label class="price" style="margin-top:10px">
												密友价:￥{$list.minMiPrice|floatval}
											</label>
											<elseif condition="$list.supportSpecification eq '1'"/>
											<label class="price" style="margin-top:10px">
												密友价:￥{$list.minMiPrice|floatval}<del><i>&yen;</i>{$list.maxFixedPrice|floatval}</del>
											</label>
											<else/>
											<label class="price" style="margin-top:10px">
												密友价:￥{$list.miPrice|floatval}
												<del>￥{$list.fixedPrice|floatval}</del>
											</label>
										</if>
										<elseif condition="$list.supportSpecification eq '1'"/>
										<if condition="$list.minDisPrice gt 0">
											<div class="price"><i>&yen;</i>{$list.minDisPrice|floatval}<del><i>&yen;</i>{$list.maxFixedPrice|floatval}</del></div>
											<else/>
											<div class="price"><i>&yen;</i>{$list.minFixedPrice|floatval}</div>
										</if>
										<else/>
										<if condition="$list.discountedPrice neq ''">
											<div class="price"><i>&yen;</i>{$list.discountedPrice|floatval}<del><i>&yen;</i>{$list.fixedPrice|floatval}</del></div>
											<else/>
											<div class="price"><i>&yen;</i>{$list.fixedPrice|floatval}</div>
										</if>
									</if>
								</div>
								<!--<if condition="$list.discountedPrice neq '' AND $list.teambuy neq '1'">
                                    <if condition=" $list.playType eq '5' AND $isEnjoyMiPrice eq '1' AND $pitem.moduleType neq 'two'">
                                        <else/>
                                        <div class="pfoot">
                                            <span class="market">市场价：<del><i>&yen;</i>{$list.fixedPrice}</del></span>
                                        </div>
                                    </if>
                                </if>-->
							</div>
							<if condition="$pitem.moduleType eq 'one'and $list['playType'] eq 4  and $list['seckillIsStart'] eq '1' and $list['seckillIsEnd'] neq '1'">
								<div class="seckill_right_top"></div>
							</if>
							<if condition="$pitem.moduleType eq 'one'and $list['teambuy'] eq 1">
								<div class="team_right_top"></div>
							</if>
						</li>
					</volist>
				</ul>
			</div>
		</if>
		<if condition="$pitem.moduleType eq 'screenMode'">
			<div class="screenMode">
				<div class="tools">
					<if condition="$pitem.showsort eq '1'">
						<span id="sort">综合排序<i>&#xe610;</i></span>
					</if>
					<span id="showModel">显示方式<i>&#xe67d;</i></span>
					<span class="right" id="screenMark">筛选<i>&#xe61f;</i></span>
				</div>
				<ul class="list one_list" id="screenMode" data-tagid="{$pitem.tagids}" data-limit="{$pitem.limit}" data-start="0" data-total="{$pitem.total}"></ul>
				<div class="sort">
					<ul>
						<li data-value="product.salesCount desc">销量由高到低</li>
						<li data-value="product.updateTime desc">上架时间从晚到早</li>
						<li data-value="product.updateTime asc">上架时间从早到晚</li>
					</ul>
				</div>
				<div class="screenMark">
					<div class="screen">
						<ul style="max-height: 90%;overflow-y: auto;">
							<volist name="pitem.screen" id="screen">
								<li data-id="{$screen.id}">
									<div class="groupName">{$screen.groupName}</div>
									<div class="tags">
										<volist name="screen.list" id="tag">
											<span data-id="{$tag.id}"><em>{$tag.name}</em></span>
										</volist>
									</div>
								</li>
							</volist>
						</ul>
						<div class="foot">
							<a id="screenCancel">重置</a>
							<a id="screenSure">确定</a>
						</div>
					</div>
				</div>
			</div>
		</if>
		<if condition="$pitem.moduleType eq 'tabmenu'">
			<div class="tabmenu">
				<div id="J_toolbar" class="tabmenu_tab">
					<ul>
						<volist name="pitem.aboutitem" id="tabmenu" key="k">
							<if condition="$tabmenu.type eq 'content'">
								<li><a <php>if($k==1){echo 'class="selected"';}</php>>{$tabmenu.taginfo.tagName}</a></li>
								<elseif condition="$tabmenu.type eq 'product'" />
								<li><a <php>if($k==1){echo 'class="selected"';}</php>>{$tabmenu.taginfo.name}</a></li>
							</if>
						</volist>
					</ul>
				</div>
				<div class="tabmenu_hide">
					<volist name="pitem.aboutitem" id="tabmenu" key="k">
						<div id="{$k}" class="tabmenu_disc">
							<a style="display:block;height:100%" href="{$tabmenu.moreurl}">
								<i class="time"></i>{$tabmenu.taginfo.description}
							</a>
						</div>
						<if condition="$tabmenu['taginfo']['picUrl'] neq ''">
							<div class="tabmenu_pic">
								<a style="display:block" href="{$tabmenu.tagimgurl}">
									<img src="{$tabmenu.taginfo.picUrl}">
								</a>
							</div>
						</if>
						<div class="tabmenu_list">
							<if condition="$tabmenu.type eq 'content'">
								<div class="content_list">
									<volist name="tabmenu.list.contentList" id="list">
										<img src="{$list.picUrl}" onclick="shopIndex.toContentDetail({$list.id})">
									</volist>
								</div>
								<elseif condition="$tabmenu.showtype eq 'proimg'"/>
								<ul style="padding:0 10px" class="proimg_list">
									<volist name="tabmenu['list']['productList']" id="list">
										<li onclick="shopIndex.toProductDetail({$list.id})" style="overflow:hidden;text-align: center;margin-top:10px;position:relative">
											<img src="{$list.picUrl}?x-oss-process=image/resize,m_fill,h_288,w_640" style="width: 100%;transform: translate(0,-50%);-webkit-transform: translate(0,-50%);position: relative;top: 50%;">
											<if condition="$list['inventory'] eq '1' and $list['inventoryCount'] elt 0"><div class="soldOut">已抢完</div></if>
											<if condition="$list['playType'] eq 4 and $list['seckillIsStart'] eq '1' and $list['seckillIsEnd'] neq '1'">
												<div class="seckillTime" style="z-index: 1;">
													<p style="text-align: center;"><!--<i class="timeicon"></i>-->
														<if condition="$list['seckillIsEnd'] neq '1'">
															<if condition="$list['seckillIsStart'] eq '1'">
																<i class="lxftime" nowtime="{$list.nowTime}" endtime="{$list.seckillEndTime}" col="0" lxfday="no" lxftext="距结束"></i>
																<else />
																<!--{$list.seckillStartTime}-->
																<!--<php>echo date("H:i:s",strtotime($list["seckillStartTime"]));</php>-->
																<i class="lxftime" nowtime="{$list.nowTime}" endtime="{$list.seckillStartTime}" col="0" lxfday="no" lxftext="距开始"></i>
															</if>
															<else />
															已抢完
														</if>
													</p>
												</div>
												<div class="seckill_right_top"></div>
											</if>
											<if condition="$list.teambuy eq 1">
												<div class="team_right_top"></div>
											</if>
											<div class="proInfo1">
												<div class="name">{$list.name}</div>
												<if condition="$list.teambuy eq '1'" >
													<div class="team">
														<if condition="$mallHue.mallHue eq '1'">
															<img src="{$Think.config.RESOURCEURL}wx_assets/images/product/mallteam_blue.png{$Think.config.RESOURCE_VER}" />
															<else/>
															<img src="{$Think.config.RESOURCEURL}wx_assets/images/product/mallteam.png{$Think.config.RESOURCE_VER}" />
														</if>

														<span>{$list.teamCount}人成团</span>
													</div>
													<div class="price"><i>&yen;</i>{$list.teamPrice|floatval}<del><i>&yen;</i>{$list.fixedPrice|floatval}</del></div>
													<elseif condition="$list.freeBuy eq '1'"/>
													<div class="price">
														<php>
															$freeBuyMoney = explode(",",$list['freeBuyMoney']);
															if(count($freeBuyMoney) > 1) {
															echo $freeBuyMoney[0].'~<i>&yen;</i>'.end($freeBuyMoney);
															} else {
															echo $freeBuyMoney[0];
															}
														</php>
														<del><i>&yen;</i>{$list.fixedPrice|floatval}</del></div>
													<elseif condition="$list.playType eq '5' AND $isEnjoyMiPrice eq '1'"/>
													<if condition="$list.supportSpecification eq '1'">
														<label class="price" style="margin-top:10px">
															密友价:￥{$list.minMiPrice|floatval}<del><i>&yen;</i>{$list.maxFixedPrice|floatval}</del>
														</label>
														<else/>
														<label class="price" style="margin-top:10px">
															<div class="price">密友价:<i>&yen;</i>{$list.miPrice|floatval}<del><i>&yen;</i>{$list.fixedPrice|floatval}</del></div>
														</label>
													</if>
													<elseif condition="$list.supportSpecification eq '1'"/>
													<if condition="$list.minDisPrice gt 0">
														<div class="price"><i>&yen;</i>{$list.minDisPrice|floatval}<del><i>&yen;</i>{$list.maxFixedPrice|floatval}</del></div>
														<else/>
														<div class="price"><i>&yen;</i>{$list.minFixedPrice|floatval}</div>
													</if>
													<else/>
													<if condition="$list.discountedPrice neq ''">
														<div class="price"><i>&yen;</i>{$list.discountedPrice|floatval}<del><i>&yen;</i>{$list.fixedPrice|floatval}</del></div>
														<else/>
														<div class="price"><i>&yen;</i>{$list.fixedPrice|floatval}</div>
													</if>
												</if>

											</div>
										</li>
									</volist>
								</ul>
								<elseif condition="$tabmenu.type eq 'product'" />
								<div class="list {$tabmenu.showtype}_list">
									<ul>
										<volist name="tabmenu['list']['productList']" id="list">
											<li onclick="shopIndex.toProductDetail({$list.id})" style="position:relative">
												<div class="proImg" style="position: relative;">
													<if condition="$list['playType'] eq 4 and $list['seckillIsStart'] eq '1' and $list['seckillIsEnd'] neq '1'">
														<div class="seckillTime">
															<p style="text-align: center;"><!--<i class="timeicon"></i>-->
																<if condition="$list['seckillIsEnd'] neq '1'">
																	<if condition="$list['seckillIsStart'] eq '1'">
																		<i class="lxftime" nowtime="{$list.nowTime}" endtime="{$list.seckillEndTime}" col="0" lxfday="no" lxftext="距结束"></i>
																		<else />
																		<!--{$list.seckillStartTime}-->
																		<!--<php>echo date("H:i:s",strtotime($list["seckillStartTime"]));</php>-->
																		<i class="lxftime" nowtime="{$list.nowTime}" endtime="{$list.seckillStartTime}" col="0" lxfday="no" lxftext="距开始"></i>
																	</if>
																	<else />
																	已抢完
																</if>
															</p>
														</div>
														<if condition="$tabmenu.showtype neq 'one'">
															<div class="seckill_right_top"></div>
														</if>
														<else/>
														<div class="taggroup">
															<php>foreach($list["picTag"] as $key=>$value){</php>
																	<span>
																		<p>{$value}</p>
																		<if condition="$mallHue.mallHue eq '1'">
																			<i><img src="{$Think.config.RESOURCEURL}wx_assets/images/product/tag_blue.png{$Think.config.RESOURCE_VER}" alt="" /></i>
																			<else/>
																			<i><img src="{$Think.config.RESOURCEURL}wx_assets/indiana/images/tag.png{$Think.config.RESOURCE_VER}" alt="" /></i>
																		</if>
																	</span>
															<php>}</php>
														</div>
														<if condition="$tabmenu.showtype neq 'one' and $list['teambuy'] eq '1'">
															<div class="team_right_top"></div>
														</if>
													</if>
													<if condition="$list['inventory'] eq '1' and $list['inventoryCount'] elt 0"><div class="soldOut">已抢完</div></if>
													<if condition="$tabmenu.showtype eq 'two' or $tabmenu.showtype eq 'one'">
														<img src="{$list['picUrl1'][1]['picUrl']}?x-oss-process=image/resize,w_200,h_200,m_mfit,x-oss-process=image/crop,w_200,h_200,g_nw">
														<else/>
														<img src="{$list.picUrl}?x-oss-process=image/resize,m_fill,h_288,w_640">
													</if>
												</div>
												<div class="proInfo">
													<div class="pname">
														<if condition="$list.freeBuy eq '1'">
															<span>超级砍价</span>
														</if>
														<if condition="$list.playType eq '3'">
															<span class="indianaState">夺宝</span>&nbsp;
														</if>
														<if condition="$list.playType eq '6'">
															<span>众筹</span>
														</if>
														{$list.name}</div>
													<div class="price" style="<php>if($list['playType']==3){echo 'float:none';}</php>">
														<if condition="$list.playType eq '3'">
															<div class="indianaInfo">
																<div class="bar">
																	<span style="width:{$list.barProgress}"></span>
																</div>
																<if condition="$tabmenu.showtype eq 'two'">
																	<span style="font-size:12px;display:block;margin-top: 4px;">开奖进度<span style="color:#009ddf">{$list.barProgress}</span></span>
																	<else/>
																	<div class="partakeCount">
																		<span>总需{$list.totalCopies}人次</span>
																		<span>剩余<label style="color:#009ddf">{$list.beenSold}</label></span>
																	</div>
																</if>

															</div>
															<div class="btn_panic_div">
																<span class="btn_panic">立即抢购</span>
															</div>
															<elseif condition="$list.playType eq '6'"/>
															<div class="indianaInfo" style="width:100%">
																<div class="bar">
																	<span style="width:{$list.barProgress}"></span>
																</div>
																<div class="crowdInfo">
																	<span>{$list.barProgress}</span>
																	<span>{$list.supportPerson||default=0}人支持</span>
																	<span>剩余<span>{$list.day}</span>天</span>
																</div>
															</div>
															<elseif condition="$list.freeBuy eq '1'"/>
															<i>&yen;</i>
															<php>
																$freeBuyMoney = explode(",",$list['freeBuyMoney']);
																if(count($freeBuyMoney) > 1) {
																echo $freeBuyMoney[0].'~<i>&yen;</i>'.end($freeBuyMoney);
																} else {
																echo $freeBuyMoney[0];
																}
															</php>
															<elseif condition="$list.teambuy eq '1' AND $tabmenu.showtype eq 'tbone'"/>
															<div class="teamInfo">
																<a>
																	<i class="ico_team">
																		<p>{$list.teamCount}<br />人团</p>
																	</i>
																	<div class="iteamNum"><i>&yen;</i>{$list.teamPrice|floatval}
																		<del style="font-size:12px;color:#fff;"><i>&yen;</i><span>{$list.fixedPrice|floatval}</span></del>
																	</div>
																	<!--<div class="iteamPrice"><i>&yen;</i><span>{$list.fixedPrice}</span></div>-->
																	<div class="toDetail">去组团</div>
																</a>
															</div>
															<elseif condition="$list.teambuy eq '1'"/>
															<i>&yen;</i>{$list.teamPrice|floatval}
															<elseif condition="$list.playType eq '5' AND $isEnjoyMiPrice eq '1'"/>
															<if condition="$list.supportSpecification eq '1'">
																<label class="price" style="margin-top:10px">
																	密友价:￥{$list.minMiPrice|floatval}<del><i>&yen;</i>{$list.maxFixedPrice|floatval}</del>
																</label>
																<else/>
																<label class="price" style="margin-top:10px">密友价:￥{$list.miPrice|floatval}
																	<del>￥{$list.fixedPrice|floatval}</del>
																</label>
															</if>
															<elseif condition="$list.supportSpecification eq '1'"/>
															<if condition="$list.minDisPrice gt 0">
																<div class="price"><i>&yen;</i>{$list.minDisPrice|floatval}<del><i>&yen;</i>{$list.maxFixedPrice|floatval}</del></div>
																<else/>
																<div class="price"><i>&yen;</i>{$list.minFixedPrice|floatval}</div>
															</if>
															<else/>
															<if condition="$list.discountedPrice neq ''">
																<div class="price"><i>&yen;</i>{$list.discountedPrice|floatval}<del><i>&yen;</i>{$list.fixedPrice|floatval}</del></div>
																<else/>
																<div class="price"><i>&yen;</i>{$list.fixedPrice|floatval}</div>
															</if>
														</if>
													</div>
													<!--<if condition="$tabmenu.showtype eq 'one' and $list.playType neq '3'">
														<div class="ico_car"></div>
													</if>-->
												</div>
												<if condition="$list['playType'] eq 4 and $list['seckillIsStart'] eq '1' and $list['seckillIsEnd'] neq '1' and $tabmenu.showtype eq 'one'"><div class="seckill_right_top"></div></if>
												<if condition="$list['teambuy'] eq 1">
													<div class="team_right_top"></div>
												</if>
											</li>
										</volist>
									</ul>
								</div>
							</if>
							<php>if($tabmenu['list']['total']>$tabmenu['tagnum']&&$tabmenu['moreurl']){</php>
							<a class="loadmore" href="{$tabmenu.moreurl}">
								加载更多
							</a>
							<php>}</php>
						</div>
					</volist>
				</div>
			</div>
		</if>
		<if condition="$pitem.moduleType eq 'bottomlist'">
			<!--<div style="height:50px"></div>-->
			<style>
				.container {
					padding-bottom: 50px;
				}
			</style>
			<div class="bottomlist">
				<ul>
					<php>$length = count($pitem['aboutitem']);</php>
					<volist name="pitem.aboutitem" id="bottomlist">
						<if condition="$bottomlist.picurl neq ''">
							<li class="bottom{$length}">
								<if condition="$bottomlist.title eq ''">
									<a href="{$bottomlist.link}">
										<img src="{$bottomlist.picurl}">
									</a>
									<else/>
									<a href="{$bottomlist.link}" style="height:-webkit-calc(100% - 17px)">
										<img src="{$bottomlist.picurl}">
										<span>{$bottomlist.title}</span>
									</a>
								</if>
							</li>
						</if>
					</volist>
				</ul>
			</div>
		</if>
		<if condition="$pitem.moduleType eq 'contentShow'">
			<div class="lazyload-wrapper">
				<div class="lazyload-scroller">
					<volist name="pitem.list.contentList" id="contentShow">
						<div class="contentShow" onclick=shopIndex.toContentDetail("{$contentShow.id}")>
							<div class="img">
						  <div class=" ui-imglazyload" data-url="{$contentShow.picUrl}">
						  </div>
							</div>
						  <p class="tit">{$contentShow.title}</p>
						  <!-- <p class="tagList">
							  <volist name="contentShow.tagList" id="tagLs">
								  <span>{$tagLs.tagName}</span>
							  </volist>
						  </p> -->
						</div>
					</volist>
				</div>
			</div>
		</if>
	</volist>
</div>
<script type="text/html" id="proPlayTpl">
	<%for(var i=0;i<productList.length;i++){
		var product = productList[i];%>
	<li class="swiper-slide" onclick="shopIndex.toProductDetail(<%=product.id%>)">
		<div class="imgDiv"><img src="<%=product['picUrl1'][1]['picUrl']%>?x-oss-process=image/resize,w_200,h_200,m_mfit,x-oss-process=image/crop,w_200,h_200,g_nw">
			<%if(product.inventory==1&&product.inventoryCount<=0){%>
			<div class="soldOut">已抢完</div>
			<%}%>
			<%if(product.playType == 4  && product.seckillIsStart == '1' && product.seckillIsEnd != '1'){%>
			<div class="seckillTime">
				<p style="text-align: center;"><!--<i class="timeicon"></i>-->
					<%if(product.seckillIsEnd != '1'){%>
					<%if(product.seckillIsStart =='1'){%>
					<i class="lxftime" nowtime="<%=product.nowTime%>" endtime="<%=product.seckillEndTime%>" col="0" lxfday="no" lxftext="距结束"></i>
					<%}else{%>
					<i class="lxftime" nowtime="<%=product.nowTime%>" endtime="<%=product.seckillStartTime%>" col="0" lxfday="no" lxftext="距开始"></i>
					<%}%>
					<%}else{%>
					已抢完
					<%}%>
				</p>
				<div class="seckill_right_top"></div>
			</div>
			<%}%>
			<%if(product.teambuy==1){%>
			<div class="team_right_top"></div>
			<%}%>
		</div>
		<div class="proInfo">
			<div class="pname">
				<%if(product.freeBuy=='1'){%>
				<span>我要代言</span>
				<%}%>
				<%if(product.playType==3){%>
				<span class="indianaState">夺宝</span>&nbsp;
				<%}%>
				<%if(product.playType==6){%>
				<span>众筹</span>
				<%}%>
				<%=product.name%></div>
			<div class="price" style="<%if(product.playType==3){%>float:none<%}%>">
				<%if(product.playType=='3'){%>
				<div class="indianaInfo">
					<div class="bar">
						<span style="width:<%=product.barProgress%>"></span>
					</div>
					<span style="font-size:12px;display:block;">开奖进度<span style="color:#009ddf"><%=product.barProgress%></span></span>
				</div>
				<%}else if(product.freeBuy=='1'){%>
				<i>&yen;</i>
				<%=freebuyPrice(product.freeBuyMoney);%>
				<%}else if(product.teambuy=='1'){%>
				<i>&yen;</i><%=product.teamPrice%>
				<%}else if(product.playType=='6'){%>
				<div class="indianaInfo" style="width:100%">
					<div class="bar">
						<span style="width:<%=product.barProgress%>"></span>
					</div>
					<div class="crowdInfo">
						<span><%=product.barProgress%></span>
						<span>剩余<span><%=product.day%></span>天</span>
					</div>
				</div>
				<%}else if(product.playType=='5'&&isEnjoyMiPrice=='1'){%>
				<%if(product.supportSpecification=='1'){%>
				<label class="price" style="margin-top:10px">
					￥<%=product.minMiPrice%>
				</label>
				<%}else{%>
				<label class="price" style="margin-top:10px">
					￥<%=product.miPrice%>
				</label>
				<%}%>
				<%}else if(product.supportSpecification=='1'){%>
					<%if(product.minDisPrice>0){%>
					<div class="price"><i>&yen;</i><%=product.minDisPrice%></div>
					<%}else{%>
					<div class="price"><i>&yen;</i><%=product.minFixedPrice%></div>
					<%}%>
				<%}else{%>
				<%if(product.discountedPrice!=''){%>
				<div class="price"><i>&yen;</i><%=product.discountedPrice%></div>
				<%}else{%>
				<div class="price"><i>&yen;</i><%=product.fixedPrice%></div>
				<%}%>
				<%}%>
			</div>
		</div>
	</li>
	<%}%>
</script>
<script type="text/html" id="screenModeTpl">
	<%for(var i=0;i<productList.length;i++){
		var product = productList[i];%>
		<li class="swiper-slide" onclick="shopIndex.toProductDetail(<%=product.id%>)">
			<div class="proImg">
				<%if(product['picUrl1']&&product['picUrl1'][1]){%>
					<img src="<%=product['picUrl1'][1]['picUrl']%>?x-oss-process=image/resize,w_200,h_200,m_mfit,x-oss-process=image/crop,w_200,h_200,g_nw">
				<%}else{%>
					<img src="<%=product['picUrl']%>?x-oss-process=image/resize,m_fill,h_200,w_200">
				<%}%>
				<%if(product.inventory==1&&product.inventoryCount<=0){%>
				<div class="soldOut">已抢完</div>
				<%}%>
				<%if(product.playType == 4  && product.seckillIsStart == '1' && product.seckillIsEnd != '1'){%>
				<div class="seckillTime">
					<p style="text-align: center;"><!--<i class="timeicon"></i>-->
						<%if(product.seckillIsEnd != '1'){%>
						<%if(product.seckillIsStart =='1'){%>
						<i class="lxftime" nowtime="<%=product.nowTime%>" endtime="<%=product.seckillEndTime%>" col="0" lxfday="no" lxftext="距结束"></i>
						<%}else{%>
						<i class="lxftime" nowtime="<%=product.nowTime%>" endtime="<%=product.seckillStartTime%>" col="0" lxfday="no" lxftext="距开始"></i>
						<%}%>
						<%}else{%>
						已抢完
						<%}%>
					</p>
				</div>
				<%}%>
			</div>
			<div class="proInfo">
				<div class="pname">
					<%if(product.freeBuy=='1'){%>
					<span>我要代言</span>
					<%}%>
					<%if(product.playType==3){%>
					<span class="indianaState">夺宝</span>&nbsp;
					<%}%>
					<%if(product.playType==6){%>
					<span>众筹</span>
					<%}%>
					<%=product.name%></div>
				<div class="price" style="<%if(product.playType==3){%>float:none<%}%>">
					<%if(product.playType=='3'){%>
					<div class="indianaInfo">
						<div class="bar">
							<span style="width:<%=product.barProgress%>"></span>
						</div>
						<span style="font-size:12px;display:block;">开奖进度<span style="color:#009ddf"><%=product.barProgress%></span></span>
					</div>
					<%}else if(product.freeBuy=='1'){%>
					<i>&yen;</i>
					<%=freebuyPrice(product.freeBuyMoney);%>
					<%}else if(product.teambuy=='1'){%>
					<i>&yen;</i><%=product.teamPrice%>
					<%}else if(product.playType=='6'){%>
					<div class="indianaInfo" style="width:100%">
						<div class="bar">
							<span style="width:<%=product.barProgress%>"></span>
						</div>
						<div class="crowdInfo">
							<span><%=product.barProgress%></span>
							<span>剩余<span><%=product.day%></span>天</span>
						</div>
					</div>
					<%}else if(product.playType=='5'&&isEnjoyMiPrice=='1'){%>
					<%if(product.supportSpecification=='1'){%>
					<label class="price" style="margin-top:10px">
						￥<%=product.minMiPrice%>
					</label>
					<%}else{%>
					<label class="price" style="margin-top:10px">
						￥<%=product.miPrice%>
					</label>
					<%}%>
					<%}else if(product.supportSpecification=='1'){%>
					<%if(product.minDisPrice>0){%>
					<div class="price"><i>&yen;</i><%=product.minDisPrice%></div>
					<%}else{%>
					<div class="price"><i>&yen;</i><%=product.minFixedPrice%></div>
					<%}%>
					<%}else{%>
					<%if(product.discountedPrice!=''&&product.discountedPrice>0){%>
					<div class="price"><i>&yen;</i><%=product.discountedPrice%></div>
					<%}else{%>
					<div class="price"><i>&yen;</i><%=product.fixedPrice%></div>
					<%}%>
					<%}%>
				</div>
			</div>
			<%if(product.playType == 4  && product.seckillIsStart == '1' && product.seckillIsEnd != '1'){%>
				<div class="seckill_right_top"></div>
			<%}%>
			<%if(product.teambuy ==1){%>
				<div class="team_right_top"></div>
			<%}%>
		</li>
	<%}%>
</script>
<script>
	template.helper("freebuyPrice",function(price){
		var price = price.split(",");
		var length = price.length;
		if(length>1){
			return price[0]+"~<i>&yen;</i>"+price[length-1];
		}else{
			return price[0];
		}
	});
</script>
<script>
	var baseUrl = '{$Think.config.SERVER_HOST}';
	var p=$.util.getParamAsObject();
	var customerId=$.util.getParam("customerId");
	var hrefPath = baseUrl+'call.html?customerId='+customerId;
	var isTeamPro="{$teambuy}";
	var teamId=p.teamId || "";
	var buyParams={
		"pids": "{$id}",
		"type": "buy",
		"qId":p.qId,
		"miUId":p.miUId,
		"vId":"{$vId}",
		"shareId":"{$sId}",
		"shareFromGuid":p.fromGuid,
		"userName":'{$userName}',
		"visitId":"{$visitId}"
	};
	var shopIndex = {
		topmenu_top : 0,
		touchStartX:0,
		touchStartY:0,
		proPlayLeft:0,
		init:function(){
			if($(".tabmenu_tab").length>0){
				shopIndex.topmenu_top = $(".tabmenu_tab").offset().top;
			}
			this._initEvent();
			this.getCartGoodsNum();
			this._initA();
			this._initProPlay();
			this._imglazyLoad();
			this._initScreen();
			this._initScrProduct();
		},
		_initScrProduct(){
			var tagid = p.tagids;
			if(tagid){
				$("#screenMode").data("screentagid",tagid);
				tagid = JSON.parse(tagid);
				for(var i=0;i<tagid.length;i++){
					tagid[i] = JSON.parse( tagid[i]);
					var tags = tagid[i].tags;
					tags = tags.split(',');
					for(var j=0;j<tags.length;j++){
						var tag =  tags[j];
						$(".screenMark .tags span[data-id='"+tag+"']").click();
					}

				}
			}
			var orderBy = p.orderBy;
			if(orderBy){
				$(".sort li[data-value='"+orderBy+"']").addClass("curr");
			}
			this._loadList(0);
		},
		_initScreen:function(){
			var screenMode =  $("#screenMode");
			if(screenMode&&screenMode.length>0){
				$.util.initDataLoading({
					me:shopIndex,
					lastChildren:function(){
						return $("#screenMode li:last");
					},
					page:function(){
						return $("#screenMode").data('start');
					},
					pageCount:function(){
						return $("#screenMode").data('total');
					}
				});
			}
		},
		_initA:function(){
			var aTag = document.getElementsByTagName("a");
			for(var i=0;i<aTag.length;i++){
				var href = aTag[i].getAttribute("href");
				if(!href){
					aTag[i].removeAttribute("href");
				}else{
					var reg = new RegExp(
							"(^|\\?|&|#)params=([^&#]*)(&|\x24|#)",
							"");
						var	match = href.match(reg);
					if (match) {
						var params= decodeURIComponent(match[2]);
						params = decodeURIComponent(params);
						if (params) {
							params = JSON.parse(params);
						}
						if(p.qId&&p.miUId){
							params.qId= p.qId;
							params.miUId = p.miUId;
						}
						var url = href.substring(0,href.indexOf(match[2]));
						aTag[i].setAttribute("href",url+encodeURIComponent(JSON.stringify(params)));
					}
				}
			}
		},
		_loadList:function(page,callback){
			var me =  $("#screenMode");
			if(!me||me.length<=0){return;}
			var limit = me.data("limit");
			var tagid = me.data("tagid");
			var screentagid = me.data("screentagid");
			var orderBy = $(".sort li.curr").data("value");
			var params = {
				"tagIds":tagid,
				"start":page*limit,
				"limit":limit,
				"orderBy":orderBy
			}
			screentagid?params.screenTag = screentagid:"";
			$.util.pageLoading.show();
			$.req.get("call.json?module=product&customerId={$customerId}&method=getProductList",{
				params
			},function(data){
				if(data&&data.products.productList){
					var proTotal = data.total;
					me.data('total',Math.ceil(proTotal/limit));
					data.products.isEnjoyMiPrice = '{$isEnjoyMiPrice}';
					var html=template("screenModeTpl", data.products);
					if(page>0){
						me.append(html);
					}else{
						me.html(html);
					}
					me.data("start",page);
				}else if(!page>0){
					me.html("");
				}
				$.util.pageLoading.hide();
				callback && callback();
			});
		},
		_initProPlay:function(){
			if($(".proPlay").length<=0){return;}
			var swipter={};
			$(".proPlay").each(function(key,value){
				var thisClass= $(this).attr("class").split(" ")[1];
				swipter[thisClass]=new Swiper('.'+thisClass, {
							pagination: '.swiper-pagination',
							slidesPerView: 3.5,
							paginationClickable: true,
							roundLengths:true,
							freeMode: false
						});
			});
			$(".proloadmore").click(function(){
				var thisClass= $(this).parents(".proPlay").attr("class").split(" ")[1];
				var start = $(this).data("start");
				var tagId = $(this).data('tagid');
				var me = $(this);
				var ul = me.parents("ul");
				var ulWidth = ul.width();
				$.util.pageLoading.show();
				$.req.get("call.json?module=product&customerId={$customerId}&method=getProductList",{
					params: {
						"tagIds":tagId,
						"start":start,
						"limit":10
					}
				},function(data){
					if(data&&data.products.productList){
						var proTotal = data.products.productList.length;
						me.data("start",start+proTotal);
						if(data.products.total>=me.data("start")){
							me.hide();
						};
						data.products.isEnjoyMiPrice = '{$isEnjoyMiPrice}';
						var html=template("proPlayTpl", data.products);
						me.before(html);
						swipter[thisClass].update();
					}
					$.util.pageLoading.hide();
				});
			});
		},
		_initEvent:function(){
			var me = this;
//			$('.screenMark,.sort').on('touchmove', function(event) {
//				event.preventDefault();
//			});
			$("#screenSure").click(function(){
				window.event.cancelBubble = true;
				var tags = [];
				$(".screenMark .screen li").each(function(){
					if($(this).find("span.curr").length>0){
						var temptags = [];
						$(this).find("span.curr").each(function(){
							temptags.push($(this).data("id"));
						})
						tags.push(JSON.stringify({
							id : $(this).data("id"),
							tags: temptags.join(",")
						}));
					}
				});
				$("#screenMode").data("screentagid",JSON.stringify(tags));
				$(".screenMark").hide();
				$('html').removeClass('noscroll');
				var screentagid = tags.join(",");
				var preview = p.preview;
				if(preview){
					var orderBy = $(".sort li.curr").data("value");
					var params =$.extend({}, p);
					params.orderBy = orderBy;
					params.tagids = $("#screenMode").data("screentagid");
					delete params.preview;
					params = encodeURIComponent(JSON.stringify(params));
					var url = hrefPath+'&module=mall&method=getMall&params='+params;
					$.util.showMsg(url);
					$(".rDialog-content").text(url);
					return;
				}
				me._loadList(0);
				$("#dataEnd").hide();
			});
			$("#screenCancel").click(function(){
				window.event.cancelBubble = true;
				$("#screenMode").data("screentagid",'');
				$(".screen .tags span.curr").removeClass("curr");
			});
			$("#screenMark").click(function(){
				var screenMark = $(".screenMark");
				screenMark.show();
//				screenMark.css("top",$(window).scrollTop()+"px");
				$(".sort").hide();
				$("#sort").removeClass("curr");
				$('html').addClass('noscroll');
			});
			$(".screenMark,.sort").click(function(){
				$(this).hide();
				$('html').removeClass('noscroll');
			});
			$("#showModel").click(function(){
				var screenMode = $("#screenMode");
				$(".screenMark,.sort").hide();
				if(screenMode.hasClass("one_list")){
					$(this).find("i").html("&#xe616;");
					screenMode.removeClass("one_list").addClass("two_list");
				}else{
					$(this).find("i").html("&#xe67d;");
					screenMode.removeClass("two_list").addClass("one_list");;
				}
			});
			$(".sort li").click(function(){
				$(this).addClass("curr").siblings(".curr").removeClass("curr");
				var preview = p.preview;
				if(preview){
					var orderBy = $(".sort li.curr").data("value");
					var params =$.extend({}, p);
					params.orderBy = orderBy;
					params.tagids = $("#screenMode").data("screentagid");
					delete params.preview;
					params = encodeURIComponent(JSON.stringify(params));
					var url = hrefPath+'&module=mall&method=getMall&params='+params;
					$.util.showMsg(url);
					$(".rDialog-content").text(url);
					return;
				}
				me._loadList(0);
				$("#dataEnd").hide();
			});
			$(".screenMark span").click(function(e){
				window.event.cancelBubble = true;
				$(this).hasClass("curr")?$(this).removeClass("curr"):$(this).addClass("curr");
			});
			$("#sort").click(function(){
				var sort = $(".sort");
				if(sort.is(":hidden")){
					$(this).addClass("curr").find("i").html("&#xe8c9;");
					sort.show();
					sort.css("top",($(".screenMode").offset().top+50)+"px");
				}else{
					sort.hide();
					$(this).removeClass('curr').find("i").html("&#xe610;");
				}
				$('html').addClass('noscroll');
			});
			$(".tabmenu_tab li").click(function(){
				var index = $(this).index();
				$(".tabmenu li a").removeClass("selected");
				$(".tabmenu li:eq("+index+")").find("a").addClass("selected");
				$('body').scrollTop($('#'+(index+1)).offset().top-35);
			})
			$(window).scroll(function(){
				if($(".tabmenu_tab").length>0){
					if($(window).scrollTop()>shopIndex.topmenu_top-40){
						$(".tabmenu_tab").addClass("tab_top");
					}else{
						$(".tabmenu_tab").removeClass("tab_top");
					}
					var top = $(".tabmenu_disc").offset().top;
					$(".tabmenu_disc").each(function(){
						var top = $(this).offset().top;
						if($(window).scrollTop()+$(this).height()>=top){
							var index = $(this).attr("id");
							index--;
							$(".tabmenu_tab").find("a.selected").removeClass("selected");
							$(".tabmenu_tab").find("a:eq("+index+")").addClass("selected");
						}
					});
					if($(window).scrollTop()+$(window).height()/2<$(".tabmenu_disc:eq(0)").offset().top){
						$(".tabmenu_tab").find("a.selected").removeClass("selected");
						$(".tabmenu_tab").find("a:eq(0)").addClass("selected");
					}
				}
			})
		},
		toTagProducts:function(id){
			var p=$.util.getParamAsObject();
			var mallQId = "{$quanInfo.qId}";
			var mallUId = "{$quanInfo.uId}";
			if((p&& p.qId)||(mallQId&&mallUId)){
				var params={
					"tagId":id,
					"miUId": p.miUId||mallUId,
					"qId": p.qId||mallQId,
					"fromGuid":p.fromGuid,
					"tplid":0
				}
			}else{
				var params={
					"tagId":id,
					"tplid":0
				}
			}
			params=encodeURIComponent(JSON.stringify(params));
			location.href = hrefPath+'&module=product&method=getProductByTagId&params='+params;
		},
		toContentDetail:function(id){
			var p=$.util.getParamAsObject();
			var mallQId = "{$quanInfo.qId}";
			var mallUId = "{$quanInfo.uId}";
			if((p&& p.qId)||(mallQId&&mallUId)){
				var params={
					"id":id,
					"miUId": p.miUId||mallUId,
					"qId": p.qId||mallQId,
					"fromGuid":p.fromGuid
				}
			}else{
				var params={
					"id":id
				}
			}
			params=encodeURIComponent(JSON.stringify(params));
			location.href = hrefPath+'&module=micontent&method=getMiContentDetail&params='+params;
		},
		toProductDetail:function(id){
			var top = $(window).scrollTop();
			$.util.cookie("scrollTop",top,{'path':'/',"expires":1});
			var p=$.util.getParamAsObject();
			var mallQId = "{$quanInfo.qId}";
			var mallUId = "{$quanInfo.uId}";
			if((p&& p.qId)||(mallQId&&mallUId)){
				var params={
					"id":id,
					"miUId": p.miUId||mallUId,
					"qId": p.qId||mallQId,
					"fromGuid":p.fromGuid
				}
			}else{
				var params={
					"id":id
				}
			}
			params=encodeURIComponent(JSON.stringify(params));
			var screenMode =  $("#screenMode");
			if(screenMode&&screenMode.length>0){
				var orderBy = $(".sort li.curr").data("value");
				var tempparams =$.extend({}, p);
				tempparams.orderBy = orderBy;
				tempparams.tagids = $("#screenMode").data("screentagid");
				delete tempparams.preview;
				tempparams = encodeURIComponent(JSON.stringify(tempparams));
				var url = hrefPath+'&module=mall&method=getMall&params='+tempparams;
				history.replaceState({},"",url);
			}
			location.href= hrefPath+'&module=product&method=getProduct&params='+params;
		},
		goCart:function(){
			var p=$.util.getParamAsObject();
			var params=$.extend(p,{
				"sid":"-1",
				"type":"buy",
				"tplid":"4",
				"mid":4,
				"vId":buyParams.vid,
				"qId":p.qId||"{$quanInfo.qId}",
				"miUId":p.miUId||"{$quanInfo.miUId}"
			});
			params=encodeURIComponent(JSON.stringify(params));
			location.href = hrefPath+'&module=product&method=getCart&params=' + params;
		},
		getCartGoodsNum:function() {
			var customerId=$.util.getParam("customerId");
			$.req.get("call.json?module=product&customerId="+customerId+"&method=getCarNum",{
				userName:"{$userName}",
				params:{
					"type":"buy",
					"sid":"-1"
				}
			},function(data){
				if (!data.code) {
					$("#carNum").text(data.total || 0).data("num", data.total);
					if (data && data.total > 0) {
						$("#car").addClass("to-car");
					} else {
						$("#car").removeClass("to-car");
					}
				}
			});
		},
		_imglazyLoad:function(){
			var $wrapper = $('.lazyload-wrapper');
			$wrapper.css('height', window.innerHeight - ($('header').height() || 42)).iScroll({
				onScrollEnd: function () {
					$.fn.imglazyload.detect();
				}
			});
			$('.ui-imglazyload').imglazyload({
				container: $('.lazyload-wrapper'),
				innerScroll: true
			}).on('loadcomplete', function () {
				$wrapper.iScroll('refresh');
			});
		},
		toSearch:function(){
            var p=$.util.getParamAsObject();
			var params=encodeURIComponent(JSON.stringify(p));
			var mallQId = "{$quanInfo.qId}";
			var mallUId = "{$quanInfo.uId}";
			if(!p.qId&&(mallQId&&mallUId)) {
				p.qId=mallQId;
				p.miUId=mallUId;
			}
			location.href=baseUrl+'call.html?customerId={$customerId}&module=product&method=toSearch&params='+params;
		},
		getShareUrl:function(){
			var me = this;
			var p=$.util.getParamAsObject();
			var mallQId = "{$quanInfo.qId}";
			var mallUId = "{$quanInfo.uId}";
			if(p.qId||(mallQId&&mallUId)) {
				p.qId = p.qId||mallQId;
				p.miUId = p.miUId||mallUId;
				p.fromUserName = "{$userName}";
			}else{
				var shareUrl = '{$mall.mallShareUrl}';
				if(!shareUrl){
					p.fromUserName = "{$userName}";
				}
			}
			var params=encodeURIComponent(JSON.stringify(p));
			shareUrl=baseUrl+'call.html?customerId={$customerId}&module=mall&method=getMall&params='+params;
			return shareUrl;
		}
	}
	shopIndex.init();
	lxfEndtime();
</script>
<script type="text/javascript">
	var shareUrl=shopIndex.getShareUrl();
	wx_share.init({
		"title":"{$mall.mallShareTitle}"||"{$title}",
		"desc":"{$mall.mallShareDesc}"||"{$title}",
		"link":shareUrl,
		"imgUrl":"{$mall.mallShareLogo}",
		"pkg":{
			"appId": '{$pkg.appId}',
			"timestamp": '{$pkg.timestamp}',
			"nonceStr": '{$pkg.nonceStr}',
			"signature": '{$pkg.signature}'
		},
		success:function(config,shareType){
		}
	});
</script>
</body></html>